#ifndef GLOBAL_H
#define GLOBAL_H

#define LOCATION_X 45
#define LOCATION_Y 20
#define VERTEX_TRIANGLE LOCATION_Y + 10

#define INITIAL_HEIGHT 30

#include <QObject>
#include<QWidget>
#include<QLabel>
#include<QJsonObject>
#include<QJsonArray>
#include<QJsonDocument>
#include<QJsonValue>
#include<QMessageBox>
#include <QByteArray>
#include<QNetworkAccessManager>
#include<QNetworkReply>
#include<QFileDialog>

//请求id用来确定这个请求是干什么的
enum class ReqID{
    ID_REG_USER = 1002,
    ID_LOG_IN = 1003,
    ID_AUTO_LOGIN = 1004,
    ID_Find_USER = 1005,
};

enum class Modules{
    REGISTERMO_LOGIN,
    Find_USER,
};

enum class ErrorCodes{
    ERR_JSON,
    ERR_NETWORK,

    StatusOK = 200,//成功
    StatusUnauthorized = 401,//登录时密码错误
    StatusNotFound = 404,//登录时用户不存在
    StatusConflict = 409,//注册时用于已存在 ,登录时表示用户已在线
    StatusInternalServerError = 500,//未知错误
};

enum class UserType{
    Other_Users,
    Current_User,
};

enum class NewsType : int{
    text = 1,
    picture,
    video,
    rests,
    videoCall
};

#endif // GLOBAL_H
